<script id="projecttpl" type="text/html">
    <% if (project_info.project_name != ''){ %>
        <div class="data" style="margin-top: 10px; padding:5px;" >
            <div style="background-color: #ccc;padding:5px;font-size: 18px;">项目基本信息</div>
            <div class="form-group" style="border: 1px solid #ccc;margin:0">
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Project_name')}:</label>
                        <div class="col-xs-12 col-sm-9" style="padding-top:7px"><%=project_info.project_name%></div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Tender_type')}:</label>
                        <div class="col-xs-12 col-sm-8" style="padding-top:7px"><%=project_info.tender_type%></div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Project_address')}<i class="text-red">*</i>:</label>
                        <div class="col-xs-12 col-sm-9">
                            <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                                <select class="province form-control" data-rule="required" name="row[province_id]" data-url="ajax/area" style="width: 33%">
                                    <% if (project_info.province_id != '') { %>
                                        <option value="<%=project_info.province_id%>"><%=project_info.province_name%></option>
                                    <% } %>
                                </select>
                                <select class="city form-control" data-rule="required" name="row[city_id]" data-query-name="province" data-url="ajax/area" style="width: 33%">
                                    <% if (project_info.city_id != '') { %>
                                        <option value="<%=project_info.city_id%>"><%=project_info.city_name%></option>
                                    <% } %>
                                </select>
                                <select class="area form-control" data-rule="required" name="row[area_id]" data-query-name="city" data-url="ajax/area" style="width: 30%">
                                    <% if (project_info.area_id != '') { %>
                                        <option value="<%=project_info.area_id%>"><%=project_info.area_name%></option>
                                    <% } %>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Pricing_date')}:</label>
                        <div class="col-xs-12 col-sm-9"><input id="c-pricing_date" class="form-control datetimepicker" data-rule="required" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[pricing_date]" type="text" value="<%=project_info.pricing_date%>"></div>
                    </div>
                </div>
                
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Project_bulid_cost')}:</label>
                        <div class="col-xs-12 col-sm-9"><input id="c-project_bulid_cost" class="form-control" step="0.01" name="row[project_bulid_cost]" type="number" value="<%=project_info.project_bulid_cost%>"></div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Project_scale')}:</label>
                        <div class="col-xs-12 col-sm-9"><input id="c-project_scale" class="form-control" step="0.01" name="row[project_scale]" type="number" value="<%=project_info.project_scale%>"></div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Structure_type')}:</label>
                        <div class="col-xs-12 col-sm-9">
                            <select class="form-control" name="row[structure_type]">
                                <option value="0">请选择</option>
                                {foreach name="projectConfig.structure_type" item="vo"}
                                <option value="{$key}" {in name="key" value="<%=project_info.structure_type%>"}selected{/in}>{$vo}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Build_form')}:</label>
                        <div class="col-xs-12 col-sm-9">
                            <select class="form-control" name="row[build_form]">
                                <option value="0">请选择</option>
                                {foreach name="projectConfig.build_form" item="vo"}
                                <option value="{$key}" {in name="key" value="<%=project_info.build_form%>"}selected{/in}>{$vo}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-xs-6 col-sm-5">
                    <div class="form-group col-sm-12">
                        <label class="control-label col-xs-12 col-sm-3">{:__('Build_unit')}:</label>
                        <div class="col-xs-12 col-sm-9"><input id="c-build_unit" class="form-control" name="row[build_unit]" type="text" value="<%=project_info.build_unit%>"></div>
                    </div>
                </div>
            </div>
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="active"><a href="#list1" aria-controls="profile" role="tab" data-toggle="tab">清单(<%=items.length%>)</a></li>
                <% if (project_rencaiji.length > 0){ %>
                <li role="presentation"><a href="#list2" aria-controls="settings" role="tab" data-toggle="tab">人材机(<%=project_rencaiji.length%>)</a></li>
                <% } %>
                <% if (project_assess.length > 0){ %>
                <li role="presentation"><a href="#list3" aria-controls="settings" role="tab" data-toggle="tab">评审材料(<%=project_assess.length%>)</a></li>
                <% } %>
            </ul>
            <div class="tab-content" style="overflow-y: scroll;height:665px">
                <div role="tabpanel" class="tab-pane active in fade panel-body form-horizontal" id="list1">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="100">序号</th>
                                <th width="100">项目编码</th>
                                <th width="150">项目名称</th>
                                <th>项目特征描述</th>
                                <th width="100">计量单位</th>
                                <th width="100">工程量</th>
                                <th width="100">综合单价(元)</th>
                                <th width="100">合价(元)</th>
                                <th width="100">暂估价(元)</th>
                            </tr>
                        </thead>
                        <tbody>
                            <% if (items.length > 0){ %>
                                <% for (var i = 0; i < items.length; i++) { %>
                                    <tr>
                                        <td><%=(i+1)%></td>
                                        <td><%=items[i].code%></td>
                                        <td><%=items[i].name%></td>
                                        <td><%=items[i].description%></td>
                                        <td><%=items[i].unit%></td>
                                        <td><%=items[i].quantity%></td>
                                        <td><%=items[i].unit_price%></td>
                                        <td><%=items[i].total_price%></td>
                                        <td><%=items[i].appraise_price%></td>
                                    </tr>
                                <% } %>
                            <% } %>
                        </tbody>
                    </table>
                </div>
                <% if (project_rencaiji.length > 0){ %>
                <div role="tabpanel" class="tab-pane fade panel-body" id="list2">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr>
                                <th width="100">序号</th>
                                <th width="100">编码</th>
                                <th width="150">名称</th>
                                <th>规格型号</th>
                                <th width="100">单位</th>
                                <th width="100">数量</th>
                                <th width="100">市场价(元)</th>
                                <th width="100">合价(元)</th>
                            </tr>
                        </thead>
                        <tbody>
                            <% if (project_rencaiji.length > 0){ %>
                                <% for (var i = 0; i < project_rencaiji.length; i++) { %>
                                    <tr>
                                        <td><%=(i+1)%></td>
                                        <td><%=project_rencaiji[i].code%></td>
                                        <td><%=project_rencaiji[i].name%></td>
                                        <td><%=project_rencaiji[i].description%></td>
                                        <td><%=project_rencaiji[i].unit%></td>
                                        <td><%=project_rencaiji[i].quantity%></td>
                                        <td><%=project_rencaiji[i].tax_unit_price%></td>
                                        <td><%=project_rencaiji[i].tax_total_price%></td>
                                    </tr>
                                <% } %>
                            <% } %>
                        </tbody>
                    </table>
                </div>
                <% } %>
                <% if (project_assess.length > 0){ %>
                <div role="tabpanel" class="tab-pane fade panel-body" id="list3">
                    <table class="table table-bordered table-hover" >
                        <thead>
                            <tr>
                                <th width="100">序号</th>
                                <th width="100">编码</th>
                                <th width="150">名称</th>
                                <th>规格型号</th>
                                <th width="100">单位</th>
                                <th width="100">数量</th>
                                <th width="100">进行税率(%)</th>
                                <th width="150">评审参考价(元)</th>
                                <th width="100">市场单价(元)</th>
                                <th width="100">合价(元)</th>
                            </tr>
                        </thead>
                        <tbody>
                            <% if (project_assess.length > 0){ %>
                                <% for (var i = 0; i < project_assess.length; i++) { %>
                                    <tr>
                                        <td><%=(i+1)%></td>
                                        <td><%=project_assess[i].code%></td>
                                        <td><%=project_assess[i].name%></td>
                                        <td><%=project_assess[i].description%></td>
                                        <td><%=project_assess[i].unit%></td>
                                        <td><%=project_assess[i].quantity%></td>
                                        <td><%=project_assess[i].tax%></td>
                                        <td><%=project_assess[i].reference_price%></td>
                                        <td><%=project_assess[i].unit_price%></td>
                                        <td><%=project_assess[i].total_price%></td>
                                    </tr>
                                <% } %>
                            <% } %>
                        </tbody>
                    </table>
                </div> 
                <% } %>
            </div>
        </div>
    <% } %>
  </script>